import React, { Component, PropTypes } from 'react'
import { InputItem } from 'antd-mobile'

export default class MyInputItem extends Component {
  render() {
    const { placeholder, addonBefore } = this.props
    return (
      <InputItem
        placeholder={placeholder}
      >
        {addonBefore ? addonBefore : null}
      </InputItem>
    )
  }
}

MyInputItem.defaultProps = {
  placeholder: '',
}

MyInputItem.propTypes = {
  placeholder: PropTypes.string,
  addonBefore: PropTypes.node,
}